
<%@ page import="aiball.Gamecharts" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'gamecharts.label', default: 'Gamecharts')}" />
		<title><g:message code="default.show.label" args="[entityName]" /></title>
		
		
		
<link rel="stylesheet" href="${resource(dir: 'css/jqui/custom-theme', file: 'jquery-ui-1.8.20.custom.css')}" type="text/css">


<!--link rel="stylesheet" href="/AIBall/js/codemirror/lib/codemirror.css"
	type="text/css" -->
<script
	src="../../static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
	type="text/javascript"></script>
<script
	src="../../static/plugins/jquery-ui-1.8.15/jquery-ui/js/jquery-ui-1.8.15.custom.min.js"
	type="text/javascript"></script>

<jq:plugin name="form" />
		
		
		<script>

		function showGame()
		{
			
			
			$('#showGameDialog').html('<iframe src="${iframeurl}" style="border:0px #FFFFFF none;" name="gameiframe" scrolling="no" frameborder="0" align=aus marginheight="0px" marginwidth="0px" height="768" width="1200"></iframe>');
			$('#showGameDialog').dialog({
				show: "fade",
				hide: "puff",
				modal: true,
				title: "Show Game",
				resizable: false,
				minWidth: 1240,
				minHeight: 768
				
			});

			$( "#showGameDialog" ).bind( "dialogbeforeclose", function(event, ui) {
				$('#showGameDialog').html('none');
				});
			
		}
		
		
		</script>
		
	</head>
	<body>
	<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

		<a href="#show-gamecharts" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="show-gamecharts" class="content scaffold-show" role="main">
			<h1>Spielübersicht</h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<ol class="property-list gamecharts">
			
				<g:if test="${gamechartsInstance?.league}">
				<li class="fieldcontain">
					<span id="league-label" class="property-label">Liga:</span>
					<span class="property-value" aria-labelledby="league-label"><g:link controller="league" action="show" id="${gamechartsInstance?.league?.id}">${gamechartsInstance?.league?.name.encodeAsHTML()}</g:link></span>
				</li>
				</g:if>
				
				<g:if test="${gamechartsInstance?.time}">
				<li class="fieldcontain">
					<span id="time-label" class="property-label">Saison:</span>
					<span class="property-value" aria-labelledby="time-label">${date}</span>
				</li>
				</g:if>
			
				<g:if test="${gamechartsInstance?.details}">
				<li class="fieldcontain">
					<span id="details-label" class="property-label">Details:</span>
					<span class="property-value" aria-labelledby="details-label"><g:fieldValue bean="${gamechartsInstance}" field="details"/></span>
				</li>
				</g:if>
			
				<br><br>
				<li class="fieldcontain">
					<table>
					<thead>
						<tr>
							<th width="100"></th>
							<th>Team 1</th>
							<th>Team 2</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>Name:</td>
							<td><g:link controller="team" action="showOtherTeam" id="${gamechartsInstance?.team1?.id}">${gamechartsInstance?.team1?.name.encodeAsHTML()}</g:link></td>
							<td><g:link controller="team" action="showOtherTeam" id="${gamechartsInstance?.team2?.id}">${gamechartsInstance?.team2?.name.encodeAsHTML()}</g:link></td>
						</tr>
						<tr>
							<td>Tore:</td>
							<td><g:fieldValue bean="${gamechartsInstance}" field="team1Goals"/></td>
							<td><g:fieldValue bean="${gamechartsInstance}" field="team2Goals"/></td>
						</tr>
						<tr>
							<td>Halbzeit-Tore:</td>
							<td><g:fieldValue bean="${gamechartsInstance}" field="team1GoalsHalfTime"/></td>
							<td><g:fieldValue bean="${gamechartsInstance}" field="team2GoalsHalfTime"/></td>
						</tr>
					</tbody>
					</table>
				</li>
			</ol>
			
			<g:form>
				<fieldset class="buttons">
				
					<a class="download" href="../downloadXML?xmlid=${gamechartsInstance?.id}">Download</a>
					
					<a class="play" onclick="showGame();">Ansehen</a>
					<g:hiddenField name="id" value="${gamechartsInstance?.id}" />
					
				</fieldset>
			</g:form>
			<br><br>
			<div class="fb-comments" data-href="http:/javakicker.de${request.forwardURI}" data-num-posts="5" data-width="940"></div>
		</div>
		
		<div id="showGameDialog" ></div>
	</body>
</html>
